// SelectVideoSize.cpp : implementation file
//

#include "stdafx.h"
#include "vc10.h"
#include "SelectVideoSize.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// SelectVideoSize dialog


SelectVideoSize::SelectVideoSize(int nSize, CWnd* pParent /*=NULL*/)
	: CDialog(SelectVideoSize::IDD, pParent)
{
	//{{AFX_DATA_INIT(SelectVideoSize)
	switch(nSize)
	{
		case VIDEO_SMALL_SIZE:	m_size = 0;	break;
		case VIDEO_LARGE_SIZE:	m_size = 1;	break;
		case VIDEO_FULL_SCREEN:	m_size = 2;	break;
		case VIDEO_WIDE_SIZE:	m_size = 3;	break;
		default:				m_size = 0;	break;
	}
	//}}AFX_DATA_INIT
}


void SelectVideoSize::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SelectVideoSize)
	DDX_Radio(pDX, IDC_SMALL_SIZE, m_size);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(SelectVideoSize, CDialog)
	//{{AFX_MSG_MAP(SelectVideoSize)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SelectVideoSize message handlers

int SelectVideoSize::GetValue()
{
	int i;

	switch(m_size)
	{
		case 0:		i = VIDEO_SMALL_SIZE;		break;
		case 1:		i = VIDEO_LARGE_SIZE;		break;
		case 2:		i = VIDEO_FULL_SCREEN;		break;
		case 3:		i = VIDEO_WIDE_SIZE;		break;
		default:	i = VIDEO_UNDEFINED_SIZE;	break;
	}

	return i;
}
